﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Package
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="full-content">
<% using(Html.BeginForm("package","register")){
    %>
    <table width="80%">
        <tr>
            <td></td>
            <td>Package</td>
            <td width="300px">Description</td>
            <td>6 Month Rate</td>
        </tr>
        <tr>
            <td>
                <%=Html.RadioButton("package","1",false) %>
            </td>
            <td>
                <h1>T1 (Basic)</h1>
                
            </td>
            <td>Data base subscription – Company name, address, phone number, email, web address, service category (2), Counties Listed (1)</td>
            <td>$150.00</td>
            
        </tr>
        <tr>
            <td>
                <%=Html.RadioButton("package","2",false) %>
            </td>
            <td>
                <h1>T2 (Eagle)</h1>
                </td>
            <td>Data base subscription – Company name, address, phone number, email, web address/link, service category (3), Banner Ad , Text Ad, Short Article on Company, Counties Listed (5) 
            </td>
            <td>$300.00</td>
        </tr>
        <tr>
            <td>
                <%=Html.RadioButton("package","3",false) %>
            </td>
            <td>
                <h1>T3 (Flying Eagle)</h1> </td>
            <td>Data base subscription – Company name, address, phone number, email, web address/link, service category (5), Banner Ad, Text Ad, Featured Article on Company, Counties Listed (All)
            </td>
            <td>$600.00</td>
        </tr>
        <tr>
            <td>
                <%=Html.RadioButton("package","0",false) %>
            </td>
            <td>
                <h1>Free Account</h1>
               </td>
            <td>1 Service category, 1 County Listed
               </td>
            <td>Free</td>
        </tr>
    </table>
<input type="submit" value="Next" id="Package" onclick="return  DoAjaxSubmit(this);"/>
 
   <script type="text/javascript">
       function DoAjaxSubmit(btnClicked) {
           var form = $(btnClicked).parents('form');
           $.ajax({
               type: "POST",
               url: form.attr('action'), //'<%=ResolveUrl("~/register/go") %>',
               data: form.serialize(),
               error: function(xhr, status, error) {
               },
               success: function(response) {
                   if (response != null) {
                       if (!response.Successful) {
                           alert("Please select the Package");
                           return false;
                       }
                       else {
                           if (response.ReturnVal == 0) {
                               window.location.href = "/Register/Free";
                           } else {
                               window.location.href = "/register/upgrade";
                           }
                       }
                   }
               }
           });
           return false;
       }
    </script>
<%} %>
</div>
</asp:Content>
